package org.codert.config;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author: TanJingyu
 * @create: 2021-06-09 17:27
 **/
@Configuration(proxyBeanMethods = false)
public class DemoConfiguration {
    @Autowired
    private ApplicationContext applicationContext;

    @Bean
    public BeanPostProcessor demoBeanPostProcessor() {
        return new BeanPostProcessor() {
            @Override
            public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
                return bean;
            }
        };
    }
}
